import com.kuang.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyText {
    public static void main(String[] args) {
        //Spring容器就相当于婚介网站
      ApplicationContext context=new ClassPathXmlApplicationContext("beans.xml");//拿到容器
          User  user= (User) context.getBean("user");
     user.show();
    }
}
